package com.xsprite.managesys.bean;

import java.util.ArrayList;
import java.util.List;

public class Privilege {
	private int typeid;
	private String priv;
	private List<String> privileges;
	public int getTypeid() {
		return typeid;
	}
	public void setTypeid(int typeid) {
		this.typeid = typeid;
	}
	public String getPriv() {
		return priv;
	}
	public void setPriv(String priv) {
		this.priv = priv;
		privileges = new ArrayList<String>();
		if(priv.indexOf(",") != -1){
			privileges.add(priv);
		} else {
			String[] pris = priv.split(",");
			for(String p : pris){
				privileges.add(p);
			}
		}
	}
}
